package customer

import (
	"counter-help/admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CusSpreadRouter struct {}

// InitCusSpreadRouter 初始化 cusSpread表 路由信息
func (s *CusSpreadRouter) InitCusSpreadRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	cusSpreadRouter := Router.Group("cusSpread").Use(middleware.OperationRecord())
	cusSpreadRouterWithoutRecord := Router.Group("cusSpread")
	cusSpreadRouterWithoutAuth := PublicRouter.Group("cusSpread")
	{
		cusSpreadRouter.POST("createCusSpread", cusSpreadApi.CreateCusSpread)   // 新建cusSpread表
		cusSpreadRouter.DELETE("deleteCusSpread", cusSpreadApi.DeleteCusSpread) // 删除cusSpread表
		cusSpreadRouter.DELETE("deleteCusSpreadByIds", cusSpreadApi.DeleteCusSpreadByIds) // 批量删除cusSpread表
		cusSpreadRouter.PUT("updateCusSpread", cusSpreadApi.UpdateCusSpread)    // 更新cusSpread表
	}
	{
		cusSpreadRouterWithoutRecord.GET("findCusSpread", cusSpreadApi.FindCusSpread)        // 根据ID获取cusSpread表
		cusSpreadRouterWithoutRecord.GET("getCusSpreadList", cusSpreadApi.GetCusSpreadList)  // 获取cusSpread表列表
	}
	{
	    cusSpreadRouterWithoutAuth.GET("getCusSpreadPublic", cusSpreadApi.GetCusSpreadPublic)  // 获取cusSpread表列表
	}
}
